<h4> Commits </h4>
<div id="accordion">
    {% for commit in commits %}
    <h3><a href="#">{{ commit.commit }} - {{ commit.subject }}</a></h3>
    <div>
        <dl>
            <dt><a href="/commit_viewer/{{ commit.commitid }}" target='_blank'>Go to Commit View page</a></dt>
              <dd>{{ commit.commitid }}</dd>
            <dt>Author</dt><dd>{{ commit.author }}</dd>
            <dt>Date</dt><dd>{{ commit.date }}</dd>
        </dl>
        {% for line in commit.body %}
        {{ line }}<br>
        {% endfor %}
    </div>
    {% endfor %}
</div>
<script>
  $('#accordion').accordion({ collapsible: true,
                              autoHeight: false,
  });
</script>

{% if baseline %}
<h4> Baseline Commit </h4>
<div id="accordion-baseline">
    <h3><a href="#">{{ baseline.commit }} - {{ baseline.subject }}</a></h3>
    <div>
        <dl>
            <dt><a href="/commit_viewer/{{ baseline.commitid }}" target='_blank'>Go to Commit View page</a></dt>
              <dd>{{ baseline.commitid }}</dd>
            <dt>Author</dt><dd>{{ baseline.author }}</dd>
            <dt>Date</dt><dd>{{ baseline.date }}</dd>
        </dl>
        {% for line in baseline.body %}
        {{ line }}<br>
        {% endfor %}
    </div>
</div>
<script>
  $('#accordion-baseline').accordion();
</script>

<br>
<a id="link" style="color:#aaa">Full Commit History Here</a>

<script type="text/javascript">
$(function() {
  $("#link").bind('click', function() {
    $('#commitInfo').dialog('close');
    $('#myTab a:last').tab('show');
  });
})

{% endif %}
